/*
 *
 * Copyright 2011, Ibrahim Arief
 * 
 * This file is part of Bambu Game Backend.
 *
 * Bambu Game Backend is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Bambu Game Backend is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Bambu Game Backend.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

package com.appspot.bambugame.server;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.appspot.bambugame.server.data.GlobalGameConfig;
import com.appspot.bambugame.server.data.HangmanPlurkQuestion;
import com.appspot.bambugame.server.data.HangmanQuestion;
import com.appspot.bambugame.server.data.HangmanQuestionSuggestion;
import com.appspot.bambugame.server.data.PlurkPlayer;
import com.appspot.bambugame.server.data.PlurkPlayerDailyPoint;
import com.appspot.bambugame.server.data.ScramblePlurkAnswerers;
import com.appspot.bambugame.server.data.ScramblePlurkQuestion;
import com.appspot.bambugame.server.data.ScrambleWord;
import com.googlecode.objectify.ObjectifyService;

public class GameContextListener implements ServletContextListener
{

    @Override
    public void contextDestroyed( ServletContextEvent arg0 )
    {
    }

    @Override
    public void contextInitialized( ServletContextEvent arg0 )
    {
        ObjectifyService.register( ScrambleWord.class );
        ObjectifyService.register( ScramblePlurkQuestion.class );
        ObjectifyService.register( ScramblePlurkAnswerers.class );
        
        ObjectifyService.register( HangmanQuestion.class );
        ObjectifyService.register( HangmanPlurkQuestion.class );
        ObjectifyService.register( HangmanQuestionSuggestion.class );
        
        ObjectifyService.register( GlobalGameConfig.class );
        
        ObjectifyService.register( PlurkPlayerDailyPoint.class );
        ObjectifyService.register( PlurkPlayer.class );
    }

}
